merge ldp branch into main branch

There are a lot of changes here, that would at least be worth a code review.