Cleanup.

Rebased and squashed the cleanup #15