Move files to mem*heap.h. Use MEMHeapHandle everywhere to reduce need for unecessary casts. Rename types to match the function names better (e.g. Frame -> Frm).