Move the getopt() code to each class (poorly)