Some styling and refactoring
Converted to coffeescript; all functionality intact
Reorganized code - sorted functions
Renamed temp functions to NameSelect