core cleanup: move purple specific transport code to backend