Deleted unused variables.
Cleaned up the code.