Refactoring of queue base class and common adatpor