More refactoring, WIP. Dinner.

Signed-off-by: Ben Corlett <bencorlett@me.com>