clean up public javascript