Simplify ref class implementation