Replacing some variables and fixing indentation