Get public IP, a few more TODOs and the main code block