Adds transitioning and locking.