Surface and confinement effects on the optical and structural properties of silicon nanocrystals