Doing some refractoring