Ripple API updated retry function for charts call. Code cleanup.