Use underscore.js for implementation

A simple change to the project to leverage Underscore.js for _.each and _.isFunction. Since this project depends on _.extend anyway, we may as well use underscore for this.