Added refresh button and some minor fixes for stability