Simple promise implementation for easy async programming