Fixing function parameter types
Determine the return types. Add structures needed. Make functions accessible from everywhere.