rearranged the main html file, threw the js in the client