Merge Bob's changes

Various changes that were needed to get the tests running