More refactoring. Start implementing IrminQueue.pull

Test are broken, that's still WIP