Clean up function declarations and some unused functions

Change-Id: I9d6e9df0b686c61597aaa0e194ab321445671a20