Clean up function declarations and some unused functions

Change-Id: I47bdc668ecf703d85f4d50c71f1347fb9e8e89d8