fix typdef and allow structs as types
fix typdef and allow structs as types