I made a silly mistake with regard to case in the parser, I've fixed it if anybody is interested. Ian J., is there a nice algorithm you use to figure out the dependencies, or is it a sort of brute force thing you are using?