Most fixes from Shyam's feedback