Validations and appcontroller changes