tiny changes, mostly deleting extra code