Fixed argument parsing, working on generation mode