Added some pragmas, and improved the code using -Wall