Some code-cleanup in ldpath-core