comp_dict: add type to dict. and fix leak mem(?)
comp_dict:  type and data added to dictionary!