Update formatting and rename some variables