refactor js and css into seperate file