edited samlite code to work with coffeescript