Traces of CM values of modular functions