Removing repetition and fixing indentation.