CMake support added & small fixes.