Use typedefs in more places