clean up js by removing extra functions