Command Line Parsing + refactor