Removed duplicated code between common and smart entity.