js bugs and css fixes