Fixed pull to refresh. Cleaned up code.