Setup protocols/pjlink and code cleanups