Assertion refactoring to globals