added more commands and refactorings