Additions and fixes for TimeSlot
Add initial implementation for the algorithm