STYLE: Miscellaneous static analysis and other style fixes