fixed some more errors
fixing and setting the memory storage to be smarter
fixing the stuff