Clean up function declarations and some unused functions

Change-Id: I367acc372d6b5996430a2c560e776a469b7e0007