Convert most unwraps to expects in ast_to_intermediate.rs