Removed unused code in commandhandler.