Refactor console2 template