Fix some shtuff
Made the queue removal system more error proof.
Fixed merge conflicts