Added entity package, misc cleanups