Fix unit tests

Many changes, some tests were not updated. No changes to actual code
just correcting the tests to the new changes.