Move logic to Priority. Refactorefactorefactorefactor.
Fix bugs. Make more productiony.