Cohesive code style and fixed validation message typo

Cohesive code style and fixed validation message typo.