Small cleanups for #464: add missing parenthesis, whitespace fixes, and simplify dictionary retrieval