Fixes and reformat

bring inline with other changes.