adds page title changes and optimises js script tags