Task priority

Fixes #150.