Made LayerFactory.js AMD compliant.
Upgraded ArcGIS API from 3.3 to 3.9.