Several renames and removed a variable to improve reusability