Refactor Pending stuff