Clean up function declarations and some unused functions

Change-Id: Ie81d270267b6c3c3620ade62eb393b28d995a654