Added some more commands and cleaned some code