Use `-Og` flag if compiling in debug mode with GCC
Minor fixes
Adapted to newest libs
Fix asserts that were firing