Some changes on code