split out separate pindex.go and manager.go files