Clean up function declarations and some unused functions

Change-Id: I5817a5ad3966918cfb1920be568b7401dd6f948c