Locks

You'll want to squash these two commits since the first won't build due to rebased changes.