Cleanup, NuGet pack

Code cleanup, Added some refactoring, packed as NuGet package