add documentation and improve order of commands