Fix a few issues discovered by clang's undefined behaviour sanitizer
Fix builds when project directory contains spaces
Add missing include_directories statement in passes/CMakeLists.txt
Fix warnings and simplify code in a few places
Fix a few small code hygiene issues.