Improve cmake macros
Organize models in a better way
Removed unused projectile_type
Use sync_with_stdio to avoid logging races