Refactoring + Unit Tests