Eliminate warnings

Add -Wall and -Wextra flags into the building process and eliminate most
of the existing warnings.