Renaming repository variables, adding docs, and formatting code