Fix references to NuGet packages

Change version to .Net 4.0
Fix application tests