Add frame handling priority

Add priority implementation.

Closes #7