Done - what do you mean by the check function for all the categories? Put all the checks for superfluous categories/double categories in their own functions, or add more functionality?