Fixed function declarations in internal.h only appearing for public functions
Fixed typedefs not appearing in external.h