Still kinda works

Fixes a few things but I long since lost track of what.