Chiara_draft1

The structure of the NSP and NDP folder changed, some functions are put
in common folder.