Write specs for title output
Refactor for consistency
Update documentation to match changes in code