Move common javascript to separate file. Clean up child pages.