Use configure_parser method. It's cleaner, more modular
Replace deprecated optparse with argparse

The optparse module is deprecated. Hence we replace it with argparse. A basic
framework for handling these options has been put in place, It needs to be
extended and implemented correctly.