Moved CLI methods to a separate file.