Fixed a bunch of small bugs.
Renamed entity_meta_dao to entity_meta_lib, again.