make fixes to commands and also improve templating