Simplified memorymanager a little bit