Initial work on cell resolver.

Still a work in process, but all (very incomplete) tests are green.