Cleaning up js, moved to coffeescript