Migrated to cmake
Fixed compiler warnings