put plugin api and registration into a module, add a new message-type, make directory-files plugin work again, delete some hundred lines of extremly silly code,