Fixed duplicated programs (TVLIB-67)
Fixed Schedule to include CanceledSchedule in query;

Minor refactorings to SyncProgramStates (TVLIB-66)