further code cleaning. sel_memory.* removed