Added selection of distinct scheduling (FIFO) and ability to set a
priority.

duplicate code must be refactored into a function. !