Add a memory_exception to replace the use of char* in the context of memory errors, and fix up tabs and spacing