Refactored a test file a bit