Implemented real memory reading in dm, modified implementation of the memory in unsigned char * rather than char * and created initialization function