Simplify cross-module dependencies, fixed bugs with queue deletion