Added pull-to-refresh logic.