refactoring, adding restart/version commands