Added possibility of multiple subnets and IPs and removed hardcoded IP