Rewrote attr access methods (fixes issues #5 and #10)