Caching error fix
Merge pull request #11 from anfruth/refactor_and_add_tests

Caching error fix