Feature/trim connections

Adding support for trimming relay connections, this feature is experimental and should be used with care. It is therefore disabled by default. More testing is necessary in the future and not recommended for general public.