Clean up function declarations and some unused functions

Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033