adding nuget spec + refactoring