Useful per-function data structures.

Refactor a bunch of things into there. Not done yet.