Add nuspec and code cleanup