Support on reject callback as second argument to then()
Refactor