Changed typo of lref as max radius to max diameter in the comments.