Change in mode and tiny cleanup