Refactoring, Add testing