Half the shit is broken, but I think I've settled on a final architecture (mostly).