Some refractoring.