Fixed indentation
Added Caching
Fixed errors with caching