Cleanup of the initial javascript