Everything made more generic
CMake support added
small fixes
Added unit test, simplified the sample
Removed rougue headers