Added validation for webages.
Refactorings