Moved queue api to its own header file