Some changes to the code.