Update; bug fixes, new setting, code cleanup

Also updated the repairing of projects by a big deal; it should be more
reliable and useful now.