big refactoring + finished parent management in matching automate