Lawmakers pass retirement bills after changes