UI: Cherry-picked a few formatting/cleanup of code.