fixed issue #46 logic

code in DiscardOldCommands.
also did rename so many classes changed.