Clean up function declarations and some unused functions

Change-Id: I4c63cd304908ce0e8ae3f9938d7323225dd314a5