move code to external file; closure compiler