refactored some of the css and js