Moved raphael code around.  Added basic centering function.