add typedefs and constants. start thinking about hiding this all in another package soon?