Finishing first step of refactoring, next step are to include more steps and improve the code