Removed unneeded code.
Renamed variables.