Carbon-mediated effects in silicon and in silicon-related materials