rearranged the routes
moved the js to be in the head for testing