Make factories smarter and simplify specs