Removed obsolete variables and commented-out code