Add missing title code
Simplify title code logic