Changed order of functions, and added some args to parseArgs