Implemented core queue data structure functions.