Merge with latest developments from EHJ-52n

Contains one bugfix for a NPE and a TODO