improved code organisation and requests cache is now base64 encoded before being stored in transients