Removed testing env-var
Fixed some unit-test problems