clean up code and add pullToRefresh library