More locking and docs