Some new tests and other minor changes