rename Ref_head -> Head.
cmpd_new defined using variadic templates.
remove unused mem_next, mem_push.
Mem functions converted to methods.