Removed debug and unused variables.