Added better page title support, can pass in string or function