This looks a bit like work in progress, according to these TODOs. Will this be done in a separate PR?