Add alert function and check for screen size on edit