Nanostructured anode and cathode materials for Li-ion batteries