Turning the code into object oriented.