Inheritance! Also, general code cleanup.