Specs for Module.Factory and related bug fixes.

Finishing specs and bug fixes.

Starting on lazy loading modules

Adding Module#setOptions to support dependency injection

Bug fixes for lazy loading. Works in Firefox now.