corrected behaviour when doing response message detection; some other
minor improvements and cleanup