Minor clean ups
Clean up nsd implementation even more