Error handling
Added loads of comments
Updated the auth mechanism slightly

Moved properties to the base class and checks to make sure credentials
are set before making request
Renamed variable