Show IP in prompt and refactor a bit