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?