Fix broken references and missing open/closing group commands.
Also change to single quotes for inline verbatim.