v0.11 compatibility
Prefer nsetImmediate to nextTick
updated travis.yml
Jshinted code