Removed unused variables and methods