libtools: datastructures stack and queue