Handle empty priority queues.
WIP on neighbors(). Fix two similar copy-paste bugs.