Improved upon refactoring task 2.