Improve icon handling and type handling