Moving towards unit tests.

Signed-off-by: Ben Jackman <ben@jackman.biz>