Fixed merge.  Fixed script ordering.  Refactored http calls into service
Refactored code