Added getopt support and finished main method prototype, let's finish it