Add metatype to component and refactor icon handling