cleaned up javascript file