Added a unit test project

Thanks for the patience, rebased to the last changes in the branch