Sketching out caching
Caching working; needs a refactor
Refactor credentials check
Closes #3