Removed old code.

Removed code that was commented out in previous commit.
Fixed some outdated comments.
Renamed variables with unclear names.