Finish-ish revamping the legacy code for the new archi.