Use reference to current stack frame

(saves quite a few array lookups)

See #218