refactoring and pnp4nagios