Added util func to determine peer ip, added config constant to determine if app is run in test mode or not, based on this test mode the peer host is determined. Added console message if message is sent to offline peer. Split capsule utils imports to those that are used.