Large code refactor, simplify Queue class