Fix warnings and formatting issues.