Delete unused entity2.js
Better exception handling

- Created a new exception base class; me.Error
- Updated all explicit throws to use the new error class, and derived error classes.