style and code fixups