code cleanup
free memory
do the right thing with the cursor
busted equalization
stuff