Refactor: General refactoring
Refactor: Optimized test code