Test suite refactoring and cleanup