Clean-up EntityHandler

This is a follow-up to a series of patches that ended with
I30d1c82700577e30788348a7a6bc2c5274783bcc.

Change-Id: Idf317ef8909e357b9777970548f997a6a0a20d51
Merge "Clean-up EntityHandler"