Some improvements, and Provider implementation