added address parsing function and replace all the ares in code that were doing their own parsing with a call to it, made verifying the flags and path obtaind from the command line a seperate function