titleize refactoring to avoid visibility problems in PHP 5.3