#42: simplifying some of the javascript and layout issues