added next generation of actions and types. Needs robusting but we now have it. Remove tcp to its own lib next.