Rebase - ready to merge with ni-/ni-dm master

Just rebased this so we can merge #40