Validations and fixed the display to properly close the table and panel for each new item