Fix up tests, make canCommit() more correct