Problem: various issues with interface generation

- didn't guard _library.h correctly, wasn't included properly
- _class header has to also pull in external API
- minor issues in generated headers