Port cilantro/ui level CoffeeScript file to JavaScript

Also add a line below for clarity.