Code formatting and various check-style fixes