This PR fixes the build and adds some tests.

Guess I should make sure it's clear this is only for new stuff :-)