A factory must be defined
Updated compability for CoffeeScript 1.5.0
Updated JS