this is just my current thinking on how this should all work … actual lib/ modules later