Revamped derived class code