Sort sources list
List header files in project
Fix compiler flag handling
Only enable -Werror in standalone build
Fix return value checking