Updated declaration file, it is now generated
Updated build script to automatically generate an internal declaration file.

It's horribly hacky, no looking.