Some optimizations in time_step routines