JS main file clean up