Used metaclass to refactor
Refactored __setattr__ methods