Add require.js support
Separate templates
Update statistics only if there are any symbols in the list
Minor refactorings