Enabling -Wall and fixing all warning messages.
merging and fixing warnings.