Added priority scheduler

Scheduler still needs work, but its almost finished (I think).