clean up js modes