Rewrote add_new() to accept input from the new dialog.