Changed task index from long to int. Sorted task constraints as per task arrival order. Extracted SUBMIT task events.