Cleanup using inheritance.