Lots of changes

We're in the process of going from PHP to JS.