Fixed some typos. Also changed global command line vars to a global dict