Fixed NPE.
Added NN and DPE facades.
Added tests.