Fixed warnings and compiler errors with the new standard.