Remove target_to_rank, rank_to_target attributes on context.

Also fixes some typos; updates tests.