Incorporate changes from Scott Rixner at Rice.  Many improvements from Scott and the CodeSkulptor project.