Fix #6: Refactoring for test classes