Improve code readability in EntityContent and related

This clean-up is partly split from I9523656 (without the new status).
I hope this makes the code more readable.

Change-Id: If488df0d010df4da343b55ca351300b337dd0a10