Added memory management and device management functions