Implemented delegate protocol and changed web requests to use delegation.