Added parameter parsing, based on JCommander