cleanup: various cose and coding style cleanup