improved a lot argument parsers and cleaned up the code