The preparation, characterization and applications of silicon nitride thin films