just some cleanup to make jslint happy!

and removing unnecessary typeof
better editor test

@fangel:

> So the test needs to either be !== undefined (instead of
"undefined"), or have the typeof. Otherwise there is a risk of calling
a method on undefined.
Merge pull request #30 from tcarlsen/cleanup-2

just some cleanup to make jslint happy!