cleaning up main js