public static void main(String[] args) {
		try {
			Tools[] rtss = new Tools[]{new RepositoryTools("repo"), new CLIEntryTools("entry"), new MacroTools("macro"), new CLIRoutineTools("routine"), new CLIUtilityTools("util")};
		
			CLIParams params = getCommandLineParamaters(args);	
			if (params == null) return;
			String runTypeOption = params.getPositional(0, null);
			if (runTypeOption == null) {				
				logErrorWithOptions("A run type option needs to be specified as the first positional argument.", rtss);
				return;				
			}
			
			params.popPositional();
			
			for (int i=0; i<rtss.length; ++i) {
				Tools tools = rtss[i];
				String toolsName = tools.getName(); 
				if (runTypeOption.equals(toolsName)) {
					if (params.positionals.size() == 0) {
						logErrorWithOptions("An addditional run type option needs to be specified following \"" + runTypeOption + "\".", tools);
						return;
					}
					String runTypeOptionAddl = params.positionals.get(0);
					params.popPositional();
					
					if (run(rtss[i], runTypeOptionAddl , params)) return;
					logErrorWithOptions("Specified run type option " + runTypeOptionAddl  + " is not known.", tools);
					return;
				}
			}			
			logErrorWithOptions("Invalid run type option " + runTypeOption + ".", rtss);
			return;				
		} catch (ToolErrorException e) {
			MRALogger.logError("Error running tool", e);
		} catch (IOException e) {
			MRALogger.logError("File error", e);
		} catch (Throwable t) {
			MRALogger.logError("Unexpected error.", t);
		}
	}