Fixed asserts in latest version.
Moved some more functions to AreaState