Lots of minor fixes

Unused variables, type annotations, proper function call signatures

Change-Id: Iae6f653faf38c9ee851d3b066412114c127e77f2
Merge "Lots of minor fixes"