Tidying up some unit testing issues