Get rid of SMfuncs.js, generate function tree server side