* Fix: factory should be called only one time depending on the environment.
 * Added closure variable $ that is taken from Backbone.$