pass_gen: some cleanup