Clean up government code

@connorcoley made the code a bit more general, but it was still slightly
hard-coded (8de964bb4793c96c24fa1989c4544c684c84bf96). This commit makes the
code cleaner and more general.