OOP-ified some things