restructure iiqueue.hs