Refactor js

Rewriting our js to be more readable and less hacky.


Not needed, we should be grabbing the csrf token from the page on submit unless we switch to a form token model.