Updated queue and nailed some bugs