Simplify get/set methods to make locking easier.