Clean up function declarations and some unused functions

Change-Id: I7a2b5970fd0ab2059b5f5b0100a049e04ba54ee3