Unit tests added, cmake structure improved