continued refactoring
fixed nagios bug