Unittest framework added
Merge changes proposed by pmorar