Added ip detection and UI elements