Fixed a name validation bug

* We did things in the wrong order in the last fix. ':' shuld have been
  checked before '/'. Refering fix:
  83a0b02a08a6efd38cb6f929bb690c48c4334e6f
* Fixed some code documentation misses.