Refactoring tests front/back