Replace json to ConfigParser and getopts to optparse.