Some overal cleanup

Hello, I did some cleanup for common cases:

* Replaced `var that = this` with passing context where possible
* Replaced `Array.prototype.slice.apply` with `slice`
* Added `throwError` handler for convenient custom error throwing

Wonder if that makes sense to rename `slice` to `toArray`. Or event use underscore's `_.toArray` instead.