Massive changes, prioritytree needs to have an error fixed