Added validation and alerts