Fixes

Some cleanups. 

See diff