Created _add_type method which also persists attributes + tests