More unit tests

This PR contributes some more unit tests; I'll keep pushing to it as I go along.