Cleanup promise logic