Fixing inconsistencies between updated code and unittests to allow tests to pass