Refactored the API Service a bit and moved some bits of code into their own separate methods, since they were getting quite large at this point.