Clean up function declarations and some unused functions

Change-Id: Id9e29dcaab64b0244b5c53abb48ac27253a11917