Clean up function declarations and some unused functions

Change-Id: Ia7fdd39b700c597a85280b39550e5de2bf193756