Moved queue to lib