Add lots more unit tests