edit locking and other minor changes