Simplified cmakelist

Remove DEBUG parameter and just use the standard CMAKE_BUILD_TYPE.
Fix compiler warnings