xrdp-ng: refactoring