Entity packages and misc cleanups