Convert pushstate to js

Would be nice to have a comment above here to say that this is the "mixins" area.