resolve #3 Improve message of duplicate model element error

- extract methods
- improve error message