Rubocop'd some code. Added support for public ip and hostname on network