many modifications to Manipulate.m