Better parameter parsing and relationship checking