Moved to memory package. Some fixes