Changed names of variables and fixed indentations