few extra fixes and a working sub egde allocator