bugfixes; start thinking about replacing R's internal completion entirely