Break down main loop in smaller methods.
Enable all clang compilation warnings.
Add glfw wait event to main loop.
Merge branch 'refactor_main_loop' into master.