fixing javascript errors
removing debug statements