(#3262) - Minor style fixes

Inlined some unnecessary function calls, extraced some re-used logic,
indented a few things.