Use selected and checked functions more consistently.