Making chpl_mem.py more readable