js and css fixes, various optimizations