relay: make connectionparser non static and cleanup