Fixes issues with unit tests
Minor cleanup