Elisp: privatize more symbols, removal of unused functions
Diagnostics: initial support for diagnostics