WIP: start migrating to subdocs (@paglias i'm going to rebase/modify this commit and
force push later, just wanted to give you a heads up)