Add a few helper functions.
Add a bunch of entity functions.
Add a bunch of entity code and initial tests.