Minor fixes and unit test updates