Refactor Promise impl to match latest spec