Added delete and refresh functions. Testing.