Fix compilation issues
Restore typedefs