Wiring up of inbox activity and several bugfixes