Bose-Fermi mixtures in optical lattices