Cleanup and page load optimization