Small clean up in the main js file