Better pending actions implementation
Adapted pending actions to the last refactorization.