Effects of boron purity, Mg stoichiometry and carbon substitution on properties of polycrystalline MgB2