Made serialized classes have protected constructors