Cleaned up the CommandListener class a little.