Unused code

Removed unused variables and params.