network analyzer code refactoring