A variety of changes to improve (but not entirely fix) behaviour