Clean up function declarations and some unused functions

Change-Id: I58c425ab9d2c01f8844226aff820dd56d88ec09c