Moved the assertion code out into seperate files.