Replace object with class ref for statics