Better support for multiple entities

With this change we can use custom checkboxes for each entity.