added support for open networks and more code cleaning