WIP dynamic payload length
merging changes made at the github webinterface