MODE-1683 Changed from normal timestamps to time-based keys and updated various other parts of the code based on code review.