Fixes

Some cleanups. 

See diff & comments