Agency

This pull request (along with the one following it) is an attempt to reduce the number of branches I have to maintain. All these commits are rebased, but the branches in question were marked as experimental anyway, so any inconvenience caused is to be expected.

I realize I'm asking you to pull in three different things at once, but (like I said) I have way too many branches to maintain and submitting three different pull requests seemed like an even worse idea.