Enabled -Wall flags and got rid of all compilation warnings.