split out separate api.go file
simplified PartitionMap type