Pretty much done

Fixed the JS loop
Removed all traces of the bad positioning code we had
Minor optimization here and there