Added validation to form pages and questions. Refactored code.