Changed download behavior of nuget and some refactor