adding some changes to the python file to clean it up and make it more modular, the parser and flags could probably be combined into a dict called settings