Clean up function declarations and some unused functions

Change-Id: Iace3118a3a8a6d494b89d4476ff3160652e940ba