Law and Piety in Medieval Islam