Refactored argparsing