clean up some typedefs
renames
more reorganization