Code cleanup for clarity of time intervals manipulations