Added state_change_time.
Removed TIME_FORMAT. It was only used once, so probably not saving memory.
Added info routine.