separated class from commandline code.
separated class from commandline code.