Refactor priority

@twobraids I added a commit to fix the ``__init__()`` problem. Shall we try this again?