Added spaces and changed names of some variables slightly