LRDOCS-722

These changes from Jesse are ready for upstream master. Thanks.