Adding the tool's main function as well as the cmd line processing code