Added Wpedantic, Wextra and Werror; updated clang-format file; fixed severals warnings and some bugs.