Utils cleanup

I had some free time and thought making some cleanup would help you contribute @marekpiechut.

Some changes to help pull in rgbkrk/atom-script#188.

@rgbkrk @marekpiechut Would you guys like to review this code?
I'm not too worried about the dependency on underscore. We almost introduced it not too long ago too; it has good utils.