sort of working as before refactoring + broadcast, , better error handling and wip for transactions