Massive refactoring of the code.
Added the nuget package creation.