Restructure a bit

Needs to be rebased now that I just merged the other stuff.