adding support for more commands, removing unused code