Added memory queue implementation.