Refactoring
Enhanced tests