Fixed indentation on some code to make it more readable.