Refined the with-macros for selecting hosts, ports and databases