Refactor the code. Improve underlying type finding routine

making it recursive.
Refactor the routines used for header parsing on demand

also read in the constructor the env variable HEADER_PARSING_ON_DEMAND
instead of reading it in several places.
Add the routine AutoParse, which is called internally by AutoLoad.