Clean up function declarations and some unused functions

Change-Id: Ie4f6197e42db298b4a3dcb6befdbd72dff6ea2b7