added some gems for better error reporting and debugging
added some comments to the controller prior to refactoring and moving to the model
moved uploaded region xml processing to the model where it belongs.