Remove legacy functions.

Change-Id: Ibff8c6517d48c1c51553dc6b9e8cc1f15739acf1