Checked the code and changed some indents and little fixes