Refactoring going on to make the code more manageable and reusable.