Clean up function declarations and some unused functions

Change-Id: Ia821ca4d03a467620b3ea6ea2520f0d177a5724d