minor formatting and variable renaming