Some code refactoring and added feature for checking pagetitles