Added a helper functuion for processing page titles