Other compiling fixes. Implementing the saving of memory