Refactored the code to utilize the objects more efficiently