Merge changes from topic 'keyauth-refactor'