Some tests refactored