added flashes and proper validation to all models