Make the code more OO.