Fixed reduce and changed warnings as errors.