WIP. This is getting huge.