some cleanup, migrated some string parsing logic to XML parsing
working type differentiation
working typing for relationships, depth of link