Edited several methods in main.py and fixed bugs dealing with queue switching