Fixed closures for one level indentation. Added more tests. Fixed issue with switch/cache being considered 2 levels increase.