queue: code cleanup in random queue