Refactoring handlers and add method restart.

Refactored handlers and introduced inheritance between class handlers
for reuse purpose.
Added function restart to restart a schedule.
Update Slot attribute's name

Change attribute Offset’s attribute name from start_offset to offset
Update the indexes
Added a function to add slot and task

This function will add a task and slot at the same time.