Clean up of code. Removed unnecessary variables.