Cleanup unused variables and typedefs.