Close optimize. Bug fix for pthread unlock
NVP cleanup 1
Cleanup 2
Cleanup 3
Cleanup 4