Bug fix to rate-estimate, better comments.