Fixes to relay initialization, rotary and buttons processing and others..