removing unneeded logic from master page load