Some improvements:

* Message when internalSampleId already exists
* Code improvements