Clean up function declarations and some unused functions

Change-Id: I9e58a0bc56f5df40621185f19b01edf074558464