Upgraded to ArcGIS JavaScript 3.4, made code AMD compliant and added new samples