Added refresh action. Fixed tests.