Use argparse for better command line parsing
Drop unused main function
Simplify
Allow passing penalty option to the optimizer