The code and explanation was moved to this site.