refactor js and css into separate files