Removed duplicate getTitle function