Nvp and rest refactoring and more tests

Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
Fix license headers