Refactored some stuff.
Merge branch 'feature-request-cache'