Took out defunct code; fixed var naming bug