Finish cartesian product validation, refactor into real packages