Fix numerous formatting issues