Remove use of memory function