use with module.exports pattern
Also reformatted
And moved to coffee script