Updated tests to bring in line with recent changes to source code
Fixed some code layout issues in tests