Reverting indentation and redoing other changes

Reverting indentation and redoing all the other changes as per advice.