Remove duplication in Object class