Molecular rectifiers and transistors based on π-conjugated materials