Fix failing unit test, code review issues.