WIP. Everything works now.