move typedefs to their own module