Studies of the crystal structure, defect chemistry, and transport properties of halide perovskite semiconductors