Log incoming

note there are some todos which will be dependent on the IDB etc. but this is combination of my branch and the master.