Update of memtestfunction
Parts are working but will require further work to be functional.