Minore refactorings
Make possible to reset state of the object to pending