more robust timer sanity check / autoincrement handling, small code cleanup