Debug + refactor + fix for coopalpha