refractoring, and fixing specs accordingly