PLA-1487 code cleanup + cache fix