Changed show messages method to static method

To remove 2 copies of the methods (from both CommandController and
ActionController. So it's only available in CommandController only.