Updated from master with the shape-fitting example