Adding validation to entities.
Merge origin/master