split manager.go into separate files