Added implementation of setters and guarded against recursion in __getattr__.