memory issue

fix some memory issues
using getopt

using getopt to parse parameters
dictionary index

Using dictionary index(start from 1) to specify which dictionaries to
use is simpler than typing their long names.
Names are saparated by commas.
some other issue

some other issue