refactor queue-related classes into a queue package