Rename some variables and better formatting