Template and cli fixes.