Add implementation for onSourceAdd and update with some bug fixes found while hooking everything up