Minor restyling of javascript code