Added real getter and setter functions. Tightened up the macros. Some ugly functions in there, could probably use a shakeout/rewrite.