remove redundant typedefs and fix warnings