added new gui code and self ip discovery