little refactoring, to conform collectd coding style
grown tests count
improvements