Assert refactoring