Katie's modifications, some of Jon's fixes