Tweaks to get rake test working properly.
First pass at performance.

* Heavily hit calls replaced with call sites
* Heavily hit ivars replaced with attr methods
* Misc cleanup