Adding tests

After some of the recent changes there were a few untested paths that
could have easily been tested.