Work in progress. Protocol optimization, bugfix with frequency change.