Improve handling of critical sections

Use LockableOntModel, etc., instead of Critical.