Some refactoring, and making it possible to discover air conditioners from command line