Clean up function declarations and some unused functions

Change-Id: I68b488d45c77ebf82029bfede98dca2400e02f2f