Refactor: user getopt_long for arguments parsing.