finalise split between _state, _locals and other. finalise chain stack pattern