First cut at a priority-queue-like thing