Fix checkstyle errors and related warnings

No functional changes