Fix semaphore priority bug. Fix bug in scheduler.
Added colors to text output.