Add unit tests stuff and change over to cmake system