Clean up function declarations and some unused functions

Change-Id: Id7ecd49ea03f225fc350a31437c32b4a738d7199