refactor js and css a bit