Compiles with (almost) no warnings.

Unused variable vs ignoring return value - what do???
Tests are pretty much finished.