Added stub for language file, refactored page rendering code to eliminate use of gloabls