Improvements to design and javascript