Fixed some js and layout issues