Code coverage improvement + refactoring tests