Fixed code for windows, and getting address from command line