refactored a bit
refactored a bit
switched to coffeescript