Succesfully refactored code.