- Fix bugs in Entity class
- Add unit tests for Entity class, one failing as of this commit