core: make methods arguments types immutable
core: process complex condition in loop header
core tests: add inner classes in internal tests