Updated js and css. Refactored code where possible