Reorganizing and moving some typedefs