Fixed up all cache dependencies
Fixing up code issues