Minor tweaks and renaming variables