Algebraic and analytic aspects of p-adic groups