Refactoring tests structure