Clean up function declarations and some unused functions

Change-Id: Ie35d71a03d2f89cd72836db21fac8746a9e85b09