Clean up function declarations and some unused functions

Change-Id: I2ca50a15209503020047975ac848df98b74089af