cleanups and refactoring in dse_allocator