Sync ConnectionManager and ManagedConnection

As in title. Also fixes a few build issues.