Added function for parsing cmd line args.