Re-fasctored promise implementation. Once-only implementation is working, need to enable persistent handlers