updated to eventemitter2 to get access to namespaced errors
refactored the factory into its own file that index.js imports/exposes