cleaned things up and added include file, and support for legacy header files and types