First bits of real meaty code.