Adds page relationship
Adds validations
Cleans up the frontend code