Style fixes in EntityFactory, wrap long lines, add use declartion

Change-Id: I39bb5daf266e30538cb1bce7e288e919e6dacb9e
Merge "Style fixes in EntityFactory, wrap long lines, add use declartion"