cleanup global main js