Relocating state instantiating logic

State instantiating and initialization logic moved to StateCompiler
class.