Revert "use closure scope locals rather than ivars (eliminates warnings, Im not sure why the ivars are bing lost)"

This partially reverts commit 86aea05ee0235153068e215ff3c71a0053a8444b.

Thanks to @thomasfedb for the first proposed solution.
Resolves #905
Merge branch 'anonymous_controller_route_helpers'