Reindented the whole code.