Add validation and error handling to GUI