fix indentation returning results
replace optparse by argparse
fix first batch of the violations reported by pylint. The remaining violations require refactoring the code.