Fixed bugs in cacher

Also needed to edit compiler to test the cacher.
Will override these changes when writing compiler.