Replace inheritance with member variable