Enhanced diagnostics and added display_historic function to main