Moved testing functionality to test classes.