Fixed database foreign keys
Changed TUI edit functions to show old values