All the changes from earlier, plus more tests