Refactored http call out of controller and into formal service.
General formatting changes.