Adding tests and streamlining prio-queue growth