Encapsulated the resultsHandler to a new class called ResultsHandler. Restructured the way arguments are handled. Now uses argument stack and all flags are processed first.