Defects and distortions in hybrid halide perovskites