anchor.diff:              unregister(?SERVER),
   	    reply(From, ok);
   
  -	{From, {Request, Module}} ->
  -	    case is_loaded(Module, State) of
  -		{loaded, File} ->
  -		    {Reply,State1} = 
  -			case Request of
  -			    {analyse, Analysis, Level} ->
  -				analyse_info(Module,State#main_state.imported),
  +	{From, {{analyse, Analysis, Level}, Module}} ->
  +	    S = try 
  +		    Loaded = is_loaded(Module, State),
  +		    analyse_info(Module,State#main_state.imported),
  +		    C = case Loaded of
  +			    {loaded, _File} ->
   				[{Module,Clauses}] = 
   				    ets:lookup(?COVER_TABLE,Module),
   				collect(Module,Clauses,State#main_state.nodes),
  -				R = do_analyse(Module, Analysis, Level, Clauses),
  -				{R,State};
  -			    
  -			    {analyse_to_file, OutFile, Opts} ->
  -				R = case find_source(File) of
  -					{beam,_BeamFile} ->
  -					    {error,no_source_code_found};
  -					ErlFile ->
  -					    Imported = State#main_state.imported,
  -					    analyse_info(Module,Imported),
  -					    [{Module,Clauses}] = 
  -						ets:lookup(?COVER_TABLE,Module),
  -					    collect(Module, Clauses,
  -						    State#main_state.nodes),
  -					    HTML = lists:member(html,Opts),
  -					    do_analyse_to_file(Module,OutFile,
  -							       ErlFile,HTML)
  -				    end,
  -				{R,State};
  -			    
  -			    is_compiled ->
  -				{{file, File},State};
  -			    
  -			    reset ->
  -				R = do_reset_main_node(Module,
  -						       State#main_state.nodes),
  -				Imported = 
  -				    remove_imported(Module,
  -						    State#main_state.imported),
  -				{R,State#main_state{imported=Imported}}
  -			end,
  -		    reply(From, Reply),
  -		    main_process_loop(State1);
  -		
  -		{imported,File,_ImportFiles} ->
  -		    {Reply,State1} = 
  -			case Request of
  -			    {analyse, Analysis, Level} ->
  -				analyse_info(Module,State#main_state.imported),
  +				Clauses;
  +			    _ ->
   				[{Module,Clauses}] = 
   				    ets:lookup(?COLLECTION_TABLE,Module),
  -				R = do_analyse(Module, Analysis, Level, Clauses),
  -				{R,State};
  -			    
  -			    {analyse_to_file, OutFile, Opts} ->
  -				R = case find_source(File) of
  -					{beam,_BeamFile} ->
  -					    {error,no_source_code_found};
  -					ErlFile ->
  -					    Imported = State#main_state.imported,
  -					    analyse_info(Module,Imported),
  -					    HTML = lists:member(html,Opts),
  -					    do_analyse_to_file(Module,OutFile,
  -							   ErlFile,HTML)
  -				    end,
  -				{R,State};
  -			    
  -			    is_compiled ->
  -				{false,State};
  -			    
  -			    reset ->
  -				R = do_reset_collection_table(Module),
  -				Imported = 
  -				    remove_imported(Module,
  -						    State#main_state.imported),
  -				{R,State#main_state{imported=Imported}}
  +				Clauses
   			end,
  -		    reply(From, Reply),
  -		    main_process_loop(State1);		    
  -		
  -		NotLoaded ->
  -		    Reply = 
  -			case Request of
  -			    is_compiled ->
  -				false;
  -			    _ ->
  -				{error, {not_cover_compiled,Module}}
  +		    R = do_analyse(Module, Analysis, Level, C),
  +		    reply(From, R),
  +		    State
  +		catch throw:Reason ->
  +			reply(From,{error, {not_cover_compiled,Module}}),
  +			not_loaded(Module, Reason, State)
  +		end,
  +	    main_process_loop(S);
  +
  +	{From, {{analyse_to_file, OutFile, Opts},Module}} ->
  +	    S = try 
  +		    Loaded = is_loaded(Module, State),
  +		    File = case Loaded of
  +			{loaded, File0} ->
  +			    [{Module,Clauses}] = 
  +				ets:lookup(?COVER_TABLE,Module),
  +			    collect(Module, Clauses,
  +				    State#main_state.nodes),
  +			    File0;
  +			{imported, File0, _} ->
  +			    File0
  +		    end,
  +		    case find_source(File) of
  +			{beam,_BeamFile} ->
  +			    reply(From, {error,no_source_code_found}),
  +			    State;
  +			ErlFile ->
  +			    analyse_info(Module,State#main_state.imported),
  +			    HTML = lists:member(html,Opts),
  +			    R = do_analyse_to_file(Module,OutFile,
  +						   ErlFile,HTML),
  +			    reply(From, R),
  +			    State
  +		    end
  +		catch throw:Reason ->
  +			reply(From,{error, {not_cover_compiled,Module}}),
  +			not_loaded(Module, Reason, State)
  +		end,
  +	    main_process_loop(S);
  +
  +	{From, {is_compiled, Module}} ->
  +	    S = try is_loaded(Module, State) of
  +		    {loaded, File} ->
  +			reply(From,{file, File}),
  +			State;
  +		    {imported,_File,_ImportFiles} ->
  +			reply(From,false),
  +			State
  +		catch throw:Reason ->
  +			reply(From,false),
  +			not_loaded(Module, Reason, State)
  +		end,
  +	    main_process_loop(S);
  +
  +	{From, {reset, Module}} ->
  +	    S = try 
  +		    Loaded = is_loaded(Module,State),
  +		    R = case Loaded of
  +			    {loaded, _File} ->
  +				do_reset_main_node(
  +				  Module, State#main_state.nodes);
  +			    {imported, _File, _} ->
  +				do_reset_collection_table(Module)
   			end,
  -		    Compiled = 
  -			case NotLoaded of
  -			    unloaded ->
  -				do_clear(Module),
  -				remote_unload(State#main_state.nodes,[Module]),
  -				update_compiled([Module],
  -						State#main_state.compiled);
  -			    false ->
  -				State#main_state.compiled
  -			end,
  -		    reply(From, Reply),
  -		    main_process_loop(State#main_state{compiled=Compiled})
  -	    end;
  +		    Imported = 
  +			remove_imported(Module,
  +					State#main_state.imported),
  +		    reply(From, R),
  +		    State#main_state{imported=Imported}
  +		catch throw:Reason ->
  +			reply(From,{error, {not_cover_compiled,Module}}),
  +			not_loaded(Module, Reason, State)
  +		end,
  +	    main_process_loop(S);		    
   	
   	{'EXIT',Pid,_Reason} ->
   	    %% Exit is trapped on the main node only, so this will only happen 
  
positive.code:     ets:match_delete(?COVER_TABLE, {#bump{module=Module},'_'}),
      ets:match_delete(?COLLECTION_TABLE, {#bump{module=Module},'_'}).
  
  
  
  %%%--Div-----------------------------------------------------------------
  
negative.code: 	{ok, File} ->
  	    case code:which(Module) of
  		?TAG -> {loaded, File};
  		_ -> throw(unloaded)
  	    end;
  	false ->
  	    case get_file(Module,State#main_state.imported) of
  		{ok,File,ImportFiles} ->
  		    {imported, File, ImportFiles};
  		false ->
  		    throw(not_loaded)
  	    end
      end.
  
  