Some changes made and comments added