Changed getattributes and setattr to metaclass and property.