Fix a few lint problems
Fix some errors running on jsTestDriver
Add copyright headers