Some more tidying of parsing

Apart from getting rid of the unused parser_func.py file, I've also cleaned up some of the code in parser for checking whether a definition has already occurred or whether a process which isn't defined is referred to. I'm not entirely convinced that this should actually be done within the parser itself. However for now it is fine. But I think this code is a little more elegant.

I also added a couple of test files for the missing and duplicated definitions.