Nonvanishing of values of modular L-functions and some applications