Refactor client templates