Moving logic to classes, created event handler to notify of IP change