Add localhostPolicy property
Convert o2hubic class to use the localhostPolicy propery and clean up the code a bit