fixes, and typedefs!