Fixed missing uses of variables.
Removed cruft from main.