Remove obsolete method and improve tests.