formatting and code style tweaks