Electronic and structural properties of carbon nanotubes