bugfix: utf8 encoding in preg_match; cleanups
bugfix in parent relation assignment