Layout tweaks, js optimizaiton