Adds name property to elements of entries.
Fixes the DifferenceInterval constructor
Implements the main loop