Convert to C-style functions to call the library.
Manager is now in a separate file