CODE: Code cleanup in memory files.