massive db changes for Scheduling Engine

Ok.. covnverted all the slot generation code