added nuget.
added several tests.
corrected code due to testresults for functions