Fixed some stuff, broke other stuff. Really messy still.