port bug fixes and minor refactor from other repository
nuget minor version bump