Modified the computeSchedule method, and refactored boilerplate code.

Notes:
- Created pre-emptive and non-pre-emptive version of ScanScheduler