Additional check for ip moved inside 'if ip is None' statement
Request to detect ip is now made once per application.
__init__ was called for every command pallete call, so I removed it.