Finished cleaning up the cache module; its good enough for now.