Separate js and css and some other fixes