Correct some variables, some indentation and comments