Clean up function declarations and some unused functions

Change-Id: I45ea22c86ea66c49fd86af2b5d0df060138f7e9a