Corrected indenatation and other errors