Refactored out separate partition.go file.