Fixed the failing tests in Python 2.7 and added the method refresh.